home *** CD-ROM | disk | FTP | other *** search
- #ifndef __GESTALTEQU__
- #include <GestaltEqu.h>
- #endif
-
- #include "const.h"
- #include "globals.h"
- #include "utils.h"
- #include "patches.h"
- #include "main.h"
-
- #include "midistuff.h"
-
- void main(void)
- {
- OSErr err;
-
- // detach ourselves
-
- RememberA0();
- SetUpA4();
- asm {
- _RecoverHandle
- move.l a0,-(sp)
- _DetachResource
- }
-
- // initialize variables for the midi manager
- PreInitMidi();
- InitGlobals();
-
-
- PatchTrap(GetNextEvent,ToolTrap,PGetNextEvent,&gGetNextEventLink);
- PatchTrap(FrameRect,ToolTrap,PFrameRect,&gFrameRectLink);
- // PatchTrap(BlockMove,OSTrap,PBlockMove,&gBlockMoveLink);
- PatchTrap(IconUtils,ToolTrap,PIconUtils,&gIconUtilsLink);
- PatchTrap(TEKey,ToolTrap,PTEKey,&gTEKeyLink);
-
- RestoreA4();
- }
-